package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.bean.OrderDetailBean;
import com.hlhj.funlike_business.moudle.OrderDetailMoudle;
import com.hlhj.funlike_business.views.OrderDetailView;

public class OrderDetailPresenter extends BasePresenter<OrderDetailMoudle,OrderDetailView> implements OrderDetailMoudle.getOrderDetail {
    @Override
    public void createModule() {
        module=new OrderDetailMoudle();
        module.setListener(this);
    }

    public void LoadOrderDetail(Context context,int order_id){
        module.LoadOrderDetail(context,order_id);
    }

    public void LoadOrderResult(Context context,int order_id,int status){
        module.LoadResult(context,order_id,status);
    }

    public void LoadOrderChargeResult(Context context,int order_id){
        module.LoadOrderChargeBack(context,order_id);
    }

    @Override
    public void loadOrderDetail(OrderDetailBean.DataBean dataBean) {
        getView().showOrderDetail(dataBean);
    }

    @Override
    public void showResult(String msg) {
        getView().showResult(msg);
    }
}
